namespace yiCommerce.Data.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class statuspointdetail : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.StatusPointDetail",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        CreatedAt = c.DateTime(nullable: false),
                        Point = c.Int(nullable: false),
                        Status_Id = c.Int(),
                        Customer_Id = c.Int(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Statuses", t => t.Status_Id)
                .ForeignKey("dbo.Customer", t => t.Customer_Id)
                .Index(t => t.Status_Id)
                .Index(t => t.Customer_Id);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.StatusPointDetail", new[] { "Customer_Id" });
            DropIndex("dbo.StatusPointDetail", new[] { "Status_Id" });
            DropForeignKey("dbo.StatusPointDetail", "Customer_Id", "dbo.Customer");
            DropForeignKey("dbo.StatusPointDetail", "Status_Id", "dbo.Statuses");
            DropTable("dbo.StatusPointDetail");
        }
    }
}
